package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 采购详情明细
 */
@Data
@ApiModel(value = "采购详情明细")
@TableName("t_buydetail")
public class BuyDetailBean {
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_buyDetailId",type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "采购价")
    @TableField("d_buyPrice")
    private Integer price;//采购价
    @ApiModelProperty(value = "采购数量")
    @TableField("d_buyNum")
    private Integer num;//采购数量
    @ApiModelProperty(value = "库存商品外键")
    @TableField("fk_goodsId")
    private String fk_goods;//库存商品外键
    @ApiModelProperty(value = "库存商品对象")
    @TableField(exist = false)
    private GoodsBean goodsBean;//库存商品对象
    @ApiModelProperty(value = "采购信息外键")
    @TableField("fk_buyOrderId")
    private Integer fk_buyOrderId;//采购信息外键

    public BuyDetailBean() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getFk_goods() {
        return fk_goods;
    }

    public void setFk_goods(String fk_goods) {
        this.fk_goods = fk_goods;
    }

    public GoodsBean getGoodsBean() {
        return goodsBean;
    }

    public void setGoodsBean(GoodsBean goodsBean) {
        this.goodsBean = goodsBean;
    }

    public Integer getFk_buyOrderId() {
        return fk_buyOrderId;
    }

    public void setFk_buyOrderId(Integer fk_buyOrderId) {
        this.fk_buyOrderId = fk_buyOrderId;
    }

    public BuyDetailBean(Integer id, Integer price, Integer num, String fk_goods, GoodsBean goodsBean, Integer fk_buyOrderId) {
        this.id = id;
        this.price = price;
        this.num = num;
        this.fk_goods = fk_goods;
        this.goodsBean = goodsBean;
        this.fk_buyOrderId = fk_buyOrderId;
    }

    @Override
    public String toString() {
        return "BuyDetailBean{" +
                "id=" + id +
                ", price=" + price +
                ", num=" + num +
                ", fk_goods='" + fk_goods + '\'' +
                ", goodsBean=" + goodsBean +
                ", fk_buyOrderId=" + fk_buyOrderId +
                '}';
    }
}
